# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=go-acceptlanguageparser
_pkgname=goacceptlanguageparser
_vendor="strukturag"
pkgver=100
pkgrel=3
pkgdesc="Go library for parsing HTTP request header Accept-Language"
url="https://github.com/$_vendor/$_pkgname"
arch="noarch"
license="BSD-3-Clause"
depends="go"
subpackages="$pkgname-doc"
options="!check" # no testsuite
source="$pkgname-$pkgver.tar.gz::https://github.com/$_vendor/$_pkgname/archive/${_pkgname}_v$pkgver.tar.gz"
builddir="$srcdir"/${_pkgname}-${_pkgname}_v$pkgver

build() {
	return 0
}

package() {
	cd "$builddir"
	mkdir -p "$pkgdir"/usr/share/doc/$_vendor/$pkgname \
		"$pkgdir"/usr/lib/go/src/github.com/$_vendor/$_pkgname
	for file in \
		LICENSE \
		README.md \
		COPYRIGHT \
		AUTHORS \
		; do \
		test -e $file && mv $file "$pkgdir"/usr/share/doc/$_vendor/$pkgname
	done
	mv *.go "$pkgdir"/usr/lib/go/src/github.com/$_vendor/$_pkgname
}

sha512sums="319bccac8bd61677b9e1437e54053b70feb4bdc1ce289ca9c68594fe0731b3efc3fbc77a9bfd2dbedc9a0a52d01bdd269981eb7d49a515ff0a6dc27c2811923d  go-acceptlanguageparser-100.tar.gz"
